Skip to content

Conversation

@bishtgautam
Copy link
Contributor

@bishtgautam bishtgautam commented Oct 13, 2025

Presently, the way a column or a patch is identified is whether they are associated with natural vegetation
or crop is to look at the landunit type.

    do c = bounds%begc,bounds%endc
       l = col_pp%landunit(c)
       
       ! Is this column a soil or a crop?
       if (lun_pp%itype(l) == istsoil .or. lun_pp%itype(l) == istcrop) then
          ! Do something on this 'c' 
       endif
      end do
    do p = bounds%begp,bounds%endp
       l = veg_pp%landunit(p)
       
       # Is the vegetation associated with soil (==natural vegetation) or a crop?
       if (lun_pp%itype(l) == istsoil .or. lun_pp%itype(l) == istcrop) then
          ! Do something for this 'p'
       endif
      end do

This PR does the following :

  • Adds new members to col_pp:
    • is_soil
    • is_crop
    • is_lake
  • Add new members toveg_pp
    • is_on_soil_col
    • is_on_crop_col
  • Using these new code changes allows the do-loops to be such that one does not have to look at the landunit type:
    do c = bounds%begc,bounds%endc       

       ! Is this column a soil or a crop?
       if (col_pp%is_soil(c) .or. col_pp%is_crop(c)) then
          ! Do something on this 'c' 
       endif
      end do
    do p = bounds%begp,bounds%endp
       
       # Is the vegetation associated with soil (==natural vegetation) or a crop?
       if (veg_pp%is_on_soil_col(p) .or. veg_pp%is_on_crop_col(p)) then
          ! Do something for this 'p'
       endif
      end do

This change will help in the development of dynamic lake areas.

@aldivi
Copy link
Contributor

aldivi commented Oct 21, 2025

@bishtgautam I don't see any obvious conflicts with the E3SM-GCAM code, although I am not sure if you are comparing with the current master, which includes the E3SM-GCAM code. Most of these files were not touched by adding the human component. The init and restart files appear not to change any land level weighting. As long as the new check functions the same as the old one, and all of the code controlled by it functions the same, I don't think it should be an issue.
I did find the 'lun_pp%itype(l) == istsoil' check in iac2lndMod that needs to be updated. I did not find any other of these checks related to the E3SM-GCAM code in the current master.

@bishtgautam
Copy link
Contributor Author

After a few open land-related PRs are merged, I will rebase this PR off the master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants